package com.coursehub.exercise.repository;

import com.coursehub.exercise.entity.StudentQuestionAnswer;
import com.coursehub.exercise.entity.StudentQuestionAnswerId;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StudentQuestionAnswerRepository extends JpaRepository<StudentQuestionAnswer, StudentQuestionAnswerId> {

    List<StudentQuestionAnswer> findByIdExerciseIdAndIdUserId(String exerciseId, String userId);

    List<StudentQuestionAnswer> findByIdExerciseId(String exerciseId);
    
    List<StudentQuestionAnswer> findByIdQuestionId(String questionId);
}


